package corp.sunny.commons.util.security;

import java.io.Serializable;
import java.security.Principal;

/**
 * @File:JAASPrincipal.java
 * @Date:Jun 10, 2011
 * @Author:Subhash Bavi
 * 
 * @Description: JAAS Principal a wrapper over the Principal component for
 *               custom implementation
 * @Copyright Sunny Corporation - 2011
 */
public class JAASPrincipal implements Principal, Serializable {

	private static final long serialVersionUID = -5540912273445081971L;
	private String name;
	private Object obj;

	public JAASPrincipal(String name, Object obj) {
		this.name = name;
		this.obj = obj;
	}

	/*
	 * Methos override
	 * 
	 * (non-Javadoc)
	 * 
	 * @see java.security.Principal#getName()
	 */
	public String getName() {
		return this.name;
	}

	public Object getJAASPrincipal() {
		return this.obj;
	}
}
